package cc.forgemod.customicon.common.network;

import net.minecraft.network.INetHandler;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public abstract class PacketBridge<REQ extends IMessage, REPLY extends IMessage> implements IMessage, IMessageHandler<REQ, REPLY> {

    @Override
    public final REPLY onMessage(REQ message, MessageContext ctx) {
        return onMessage(message, ctx.netHandler);
    }

    public abstract REPLY onMessage(REQ pMsg, INetHandler pHandler);

}
